<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-lazy-init="true">
    <!--Spring Mail Sender-->
    <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
        <property name="host" value="${smtp.host}"/>
        <property name="username" value="${smtp.username}"/>
        <property name="password" value="${smtp.password}"/>
        <property name="javaMailProperties">
            <props>
                <prop key="mail.smtp.auth">true</prop>
            </props>
        </property>
    </bean>

    <!--系统邮件投递组件-->
    <bean id="systemMailSender" class="cn.firstsoft.firstframe.plugins.email.service.SystemMailSender"
          autowire="byName">
        <property name="systemMail">
            <value>${email.systemmail}</value>
        </property>
        <property name="encode">
            <value>${email.encode}</value>
        </property>
    </bean>

    <!-- html格式邮件内容生成器 -->
    <bean id="emailContentGenerator" class="cn.firstsoft.firstframe.plugins.email.service.EmailContentGenerator"
          autowire="byName">
        <property name="encode" value="${email.encode}"/>
        <property name="templateDir" value="/cn/firstsoft/firstframe/plugins/email/htmlskin/"/>
        <property name="templateFile" value="view.ftl"/>
        <property name="previewHtmlFileDir" value="preview"/>
    </bean>
</beans>
